package com.hanamaki.struct;

public class DoWhile2 {


    public static void main(String[] args) {

//         1-----100 和
         // 初始值
        int i = 0;
        int sum = 0;
        while (i <= 100) {
            sum += i;
            i++;
        }
        System.out.println(sum);

        int a = 0;
        int sum1 = 0;
        do {
            sum1 += a;
            a++;
        } while (a <= 100);

        System.out.println(sum1);

    }
}
